/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package ormsamples;

import org.orm.*;
public class RetrieveAndUpdateEncriptacionData {
	public void retrieveAndUpdateTestData() throws PersistentException {
		PersistentTransaction t = orm.EncriptacionPersistentManager.instance().getSession().beginTransaction();
		try {
			orm.En_logs lormEn_logs = orm.En_logsDAO.loadEn_logsByQuery(null, null);
			// Update the properties of the persistent object
			orm.En_logsDAO.save(lormEn_logs);
			t.commit();
		}
		catch (Exception e) {
			t.rollback();
		}
		
	}
	
	public void retrieveByCriteria() throws PersistentException {
		System.out.println("Retrieving En_logs by En_logsCriteria");
		orm.En_logsCriteria en_logsCriteria = new orm.En_logsCriteria();
		// Please uncomment the follow line and fill in parameter(s)
		//en_logsCriteria.lo_id_logs.eq();
		System.out.println(en_logsCriteria.uniqueEn_logs());
		
	}
	
	
	public static void main(String[] args) {
		try {
			RetrieveAndUpdateEncriptacionData retrieveAndUpdateEncriptacionData = new RetrieveAndUpdateEncriptacionData();
			try {
				retrieveAndUpdateEncriptacionData.retrieveAndUpdateTestData();
				//retrieveAndUpdateEncriptacionData.retrieveByCriteria();
			}
			finally {
				orm.EncriptacionPersistentManager.instance().disposePersistentManager();
			}
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
}
